include makefile.rules



all: comp bin

comp:
	make -C src

bin:
	 $(CC) $(FILE_O) -o $(BIN)

clean:
	rm -f `find . -name "*~"`
	rm -f `find . -name "#*"`
	rm -f `find . -name "*.o"`


distclean: clean
	rm -f `find . -name "*.so"`
	rm -f `find . -name "*.a"`
	rm -f `find . -name "*.tst"`
	rm -f $(TRASH)

dist: distclean
	cd .. && tar -cvjf --exclude .git $(TARBALL) $(FILENAME) && mv $(TARBALL) $(FILENAME)

check:
	@cd check && $(CC) $(CFLAGS) ch1.c $(CHECKF) -o ch1
	@cd check && $(CC) $(CFLAGS) char1.c $(CHECKF) -o char1
	@cd check && $(CC) $(CFLAGS) hexa.c $(CHECKF) -o hexa1
	@cd check && $(CC) $(CFLAGS) int.c  $(CHECKF) -o int1
	@cd check && $(CC) $(CFLAGS) octal.c $(CHECKF) -o octal
	@cd check && $(CC) $(CFLAGS) print1.c $(CHECKF) -o print
	@cd check && $(CC) $(CFLAGS) str1.c $(CHECKF) -o str1
	@cd check && $(CC) $(CFLAGS) striing1.c $(CHECKF) -o striing1
	@cd check && $(CC) $(CFLAGS) test10.c $(CHECKF) -o all
	@cd check && $(CC) $(CFLAGS) uns1.c $(CHECKF) -o uns
	@cd check && $(CC) $(CFLAGS) unsiged1.c $(CHECKF) -o unsigned
	@cd check && ./check.pl

distcheck: dist
	tar -xf $(TARBALL)
	cd $(FILENAME) && ./configure && make && make check

.PHONY : check
